import 'package:flutter/material.dart';

void main() => runApp(MyApp());


/*
Padding可以给其子节点添加补白（填充
fromLTRB(double left, double top, double right, double bottom)：分别指定四个方向的补白。
all(double value) : 所有方向均使用相同数值的补白。
only({left, top, right ,bottom })：可以设置具体某个方向的补白(可以同时指定多个方向)。
symmetric({ vertical, horizontal })：用于设置对称方向的补白，vertical指top和bottom，horizontal指left和right
*/

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Padidng'),
        ),
        body: new Container(
          color: Colors.orange,
          child: new Padding(
            padding: EdgeInsets.all(0),
            child: new Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                new Padding(
                  padding: EdgeInsets.only(left: 10),
                  child: new Text('Hello world'),
                ),
                new Padding(
                  padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 30),
                  child: new Text('I am jack'),
                ),
                new Padding(
                  padding: const EdgeInsets.fromLTRB(10, 10, 10, 10),
                  child: new Text('Your friend'),
                )
              ],
            )
          ),
        ),
      )
    );
  }
}

